<?php

class Application_Form_Domena extends Zend_Form {
    protected $_style = array();
    public function __construct($style) {
        $this->_style=$style;
        return parent::__construct();
    }
    public function init() {
        $this->setMethod('post');
        $this->setAction("/admin/domena");
        $this->addElement('text', 'nazwa', array(
            'label' => 'Nazwa domeny:',
            'required' => true
        ));
        $this->addElement('text', 'title', array(
            'label' => 'Tytuł:',
            'required' => true
        ));
        $this->addElement('text', 'description', array(
            'label' => 'Opis:',
            'required' => true
        ));
        $this->addElement('text', 'keywords', array(
            'label' => 'Słowa kluczowe(po przecinku):',
            'required' => true
        ));
        
        $this->addElement('select', 'style', array(
            'label' => 'Styl:',
            'required' => true,
            'multioptions' => $this->_style
        ));

        $this->addElement('hidden', 'id');

        $this->addElement('submit', 'dodaj');
    }
}
